package com.dwd.user.mapper;

import com.dwd.basic.mapper.BaseMapper;
import com.dwd.org.pojo.Employee;
import com.dwd.user.pojo.LoginInfo;
import com.dwd.user.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;


/**
 * @Description: TODO
 * @Author 汶狄
 * @Date 2021/1/5 11:31
 * @Version 1.0
 */
@Repository
@Mapper
public interface UserMapper extends BaseMapper<User> {
    /**
     * 校验手机号码是否存在
     *
     * @param user
     * @return
     */
    User queryUserByPhone(String user);

    /**
     * 扩展登陆根据用户名查询用户
     *
     * @param username
     * @return
     */
    Employee queryEmpByUsername(String username);

    /**
     * 校验邮箱是否存在
     *
     * @param email
     * @return
     */
    User queryUserByEmail(String email);

    /**
     * 根据loginingo查询登陆用户
     *
     * @param loginInfo
     * @return
     */
    User queryUserByLoginInfo(LoginInfo loginInfo);
}